﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class exame2_boomer : MonoBehaviour
{
    public bool isBoom = false;
    public GameObject boomDownPoint;
    public GameObject boom;
    float timer = 0f;
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        if(isBoom)
        {
            timer += Time.deltaTime;
            if(timer>0.5)
            {
                Instantiate(boom, boomDownPoint.transform.position, boomDownPoint.transform.rotation);
                timer = 0;
            }
        }
    }

    public void enableBoom(bool enable)
    {
        isBoom = enable;
    }
}
